package com.example.reagent_management.ui.operatedialog.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.lib_base.utils.DateConvertUtils
import com.example.reagent_management.R
import com.example.reagent_management.room.entity.ReagentInformation

class StoreChooseAdapter : BaseQuickAdapter<ReagentInformation,BaseViewHolder>(
    R.layout.item_store
) {
    override fun convert(holder: BaseViewHolder, item: ReagentInformation) {
        holder.apply {
            setText(R.id.project_name,item.projectName)
            setText(R.id.reagent_names,item.reagentName)
            setText(R.id.type,item.reagentType.toString())
            setText(R.id.date,DateConvertUtils.convertTimeToServiceType(item.createTime.timeInMillis))
        }
    }
}